package com.itheima.d9_mata_annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(value = {ElementType.TYPE, ElementType.METHOD}) //限定当前自定义的注解作用的位置
@Retention(RetentionPolicy.RUNTIME)
public @interface Book {
    String name() default "";

    double price() default 0.0;
}

@Book
class BookStore{
//    @Book
    public String name;

    @Book
    public void test() {

    }
}
